package com.yao.code;

/**
 * @author yaoquanwei
 * @date 2021/8/10 8:40
 */
public class Code210810 {

    /**
     * 剑指offer 5.替换空格
     *
     * @param s
     * @return
     */
    public static String replaceSpace(String s) {
        return s.replace(" ", "%20");
    }

    /**
     * 剑指offer 58.左旋字符串
     *
     * @param s
     * @param n
     * @return
     */
    public String reverseLeftWords(String s, int n) {
        int len = s.length();
        s = s + s;
        return s.substring(n, n + len);

    }

    public static void main(String[] args) {

    }
}
